﻿<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no, maximum-scale=1.0" />
    <title>信息查询</title>
    <link rel="stylesheet" type="text/css" href="/css/common.css" />
    <link rel="stylesheet" type="text/css" href="/css/index.css" />
</head>

<body class="bg_ef">
    <div class="container">
        <div class="header">
            <div class="headbg">
                <a href="/page/enterprise.html" class="return"></a>
            </div>
            <p>企业信息</p>
        </div>
        <main>
            <div class="list-box">
                <div class="list_name">
                    <span>基本情况</span>
                </div>
                <ul class="list-item">
                    <li><p>企业名称:<span id="EnterpriseName"></span></p></li>
                    <li><p>企业地址:<span id="EnterpriseAddress"></span></p></li>
                    <li><p>企业法人:<span id="LegalPerson"></span></p></li>
                    <li><p>许可证号:<span id="Code"></span></p></li>
                    <li><p>点评情况:<span id="TypeName"></span></p></li>
                </ul>
            </div>
            <div class="list-box">
                <div class="list_name">
                    <span>公示信息</span>
                </div>
                <ul class="list-item">
                    <li><span style="background-color: rgb(240, 115, 115);">问</span><span id="PublicProgramDescribeStr"></span></li>
                </ul>
                </div>
</main>
    </div>
</body>

</html>
<script type="text/javascript" src="/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="/lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/static/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="/static/h-ui.admin/js/H-ui.admin.js"></script>
<script src="/static/usi/core.js"></script>
<script src="/static/usi/tools.js"></script>
<script>
    window.onload = function () {
        var unid = jQuery.usi.core.getURLParam("Unid");
        jQuery.usi.core.get(ip + api + "/GetEnterpriseByUnid", { unid: unid }, false, function (data) {

            //设备基本信息
            if (data.data.enterprise == null) {
                $("#EnterpriseName").html("未知");
                $("#EnterpriseAddress").html("未知");
                $("#LegalPerson").html("未知");
                $("#Code").html("未知");
                $("#TypeName").html("未知");
            }
            else {
                var name = "未知";
                if (!jQuery.usi.core.isNullOrEmpty(data.data.enterprise))
                    name = data.data.enterprise.name

                $("#EnterpriseName").html(name);
                $("#EnterpriseAddress").html(jQuery.usi.core.isNullOrEmpty(data.data.enterprise.address) ? "未知" : data.data.enterprise.address);
                $("#LegalPerson").html(jQuery.usi.core.isNullOrEmpty(data.data.enterprise.legalPerson) ? "未知" : data.data.enterprise.legalPerson);
                var code = "未知";
                if (data.data.enterprise.permit != null && data.data.enterprise.permit.length > 0 && !jQuery.usi.core.isNullOrEmpty(data.data.enterprise.permit[0].code))
                    code = data.data.enterprise.permit[0].code;
                $("#Code").html(code);
                $("#TypeName").html(jQuery.usi.core.isNullOrEmpty(data.data.enterprise.typeName) ? "未点评" : data.data.enterprise.typeName);
            }


            //公示信息
            if (data.data.checkMain == null) {
                $("#PublicProgramDescribeStr").html("未知");
            }
            else {
                $("#PublicProgramDescribeStr").html(jQuery.usi.core.isNullOrEmpty(data.data.checkMain.publicProgramDescribeStr) ? "无" : data.data.checkMain.publicProgramDescribeStr);
            }
        });
    }

</script>